package com.my.spvideo.dao.mysql.baidumv;

import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.my.spvideo.vo.Company;


public interface CompanyMapper {
	
	/**
	 * 数量
	 * 
	 * @return
	 */
	public int getCompanyListCount(@Param("name") String name,
									@Param("roleId") int roleId,
									 @Param("businessId") int businessId);
	
	
	/**
	 * 初次展示
	 * 
	 * @param startNum
	 * @param pageSize
	 * @return
	 */
	public List<Company> getCompanyList(@Param("startNum") int startNum, @Param("pageSize") int pageSize,
			@Param("name") String name,
			@Param("roleId") int roleId,
			 @Param("businessId") int businessId);
	

	/**
	 * 添加信息
	 * 
	 * @param cpInfo
	 * @return
	 */
	public int insertCompanyInfo(@Param("Company") Company company);

	/**
	 * 删除信息
	 * 
	 * @param id
	 * @return
	 */
	public int deleteCompany(int id);
	/**
	 * 更新信息
	 * 
	 * @param cpInfo
	 * @return
	 */
	public int updateCompany(@Param("Company") Company company);

	/**
	 * 根据businessId 查询商务对应公司Id
	 * @return
	 */
	public List<String> selectId(@Param("businessId") int businessId);
	
	
	
	List<Company> selectCompanyName(@Param("businessId") int businessId);
	
	List<Company> selectAllCompanyName();
	
	Company selectCompany(int id);
	
	Company selectCompanyByUserId(@Param("userId") int userId);

	List<Company> selectBusinessLeader(@Param("businessId") int businessId);
	
	List<Integer> selectCompanyId(@Param("id")int id,@Param("businessLeader")String businessLeader);
	
	Company selectCompanyNameOne(@Param("companyId") int companyId);
	
	
	List<Integer> selectUserCompanyId(@Param("userId") int userId);
	
	int selectTwoUserId(@Param("twoUserId") int twoUserId);
	
	int selectTwoUserIdById(@Param("twoUserId") int twoUserId,@Param("id")int id);
	
	List<Integer> selectTwoUserIdList(@Param("twoUserId") int twoUserId);
	
}
